package za.org.jcicada.genss.sensor.impl;

import za.org.jcicada.genss.sensor.ISensor;
import za.org.jcicada.genss.sensor.ISensorValue;

/**
 * Base class for sensor status rule objects.
 * @author rcrida
 */
public abstract class StatusRuleBase {
    
    /**
     * Handle to the sensor that this rule applies to.
     */
    private ISensor sensor;
    
    /**
     * Construct object
     * @param sensor the sensor that this rule applies to.
     */
    public StatusRuleBase(ISensor sensor) {
        this.sensor = sensor;
    }
    
    public void setValue(ISensorValue value) throws InvalidSensorValue {
        sensor.setValue(value);
    }

}
